#
# $Id: Makefile,v 1.9 1995/03/29 20:26:51 chris Exp $
#

CC = gcc
INCLUDES = -I../dtd/libdtd
CFLAGS = $(INCLUDES) -O2 -ansi -D_GNU_SOURCE
LIBS = -L. -lhtml -ll -L../dtd/libdtd -ldtd
OBJS = y.tab.o lex.yy.o entity.o htmllib.o
BINARIES = wtin verify gethtmls

all: $(BINARIES)

libhtml.a: $(OBJS)
	$(AR) rcv $@ $(OBJS)
	ranlib $@

wtin: wtin.o libhtml.a
	$(CC) wtin.o $(LIBS) -o wtin

verify: verify.o libhtml.a
	$(CC) verify.o $(LIBS) -o verify

gethtmls: gethtmls.o libhtml.a
	$(CC) gethtmls.o $(LIBS) -o gethtmls

y.tab.c: html.y entity.h htmlloc.h
	yacc -d html.y

lex.yy.c: y.tab.h html.l htmlloc.h
	lex html.l

html.o: htmlloc.h

y.tab.h: y.tab.c

wtin.c: html.h

entity.c: entity.h

clean:;	rm -f core a.out $(OBJS) lex.yy.c y.tab.h y.tab.c y.output verify wtin make.out gethtmls libhtml.a
